import React from 'react';
import { Router, Route, Switch } from 'dva/router';
import IndexPage from './routes/IndexPage';
import HomePage from './routes/HomePage';
import SecondPage from './routes/SecPage';

function RouterConfig({ history }) {
  return (
    <Router history={history}>
      <Switch>
        {/* <Route component={IndexPage} > */}
          <Route path="/" exact child={HomePage} component={HomePage} />
          <Route path="/index" exact component={HomePage} />
          <Route path="/sec" exact component={SecondPage} />
        {/* </Route> */}
      </Switch>
    </Router>
  );
}

export default RouterConfig;
